package physics;
import build.Simulation;

/**
 * @author Sam Rang
 */
public class FixedMass extends Mass {

    /**
     * Constructor for the Fixed Mass Object, drawing from the Mass class.
     * @param id The ID of the mass
     * @param x The x location of the mass
     * @param y The y location of the mass
     * @param mass The mass of the object
     */
    public FixedMass (int id, double x, double y, double mass) {
        super(id, x, y, -mass);
    }

    /**
     * Doesn't move, unlike a regular mass.
     * @param canvas Simulation
     * @param dt Time elapsed since last update
     * @param a Assembly containing fixed mass
     */
    @Override
    public void update (Simulation canvas, double dt, Assembly a) {
        setCenter(getCenter().getX(), getCenter().getY());
    }

}
